

            function addArduinoCod (Blockly) {
            
                        

                        
        Blockly.Arduino['EXT_ROTARY_POTENTIOMETERS_BLOCK_1607506888141'] = function(block)
        {
            let pin = this.getFieldValue('pin');
          
            Blockly.Arduino.definitions_['include_EXT_ROTARY_POTENTIOMETERS_BLOCK_1607506888141'] = ``;
            Blockly.Arduino.definitions_['define_EXT_ROTARY_POTENTIOMETERS_BLOCK_1607506888141'] = `float voltage=0,data;\r\nint analogPin${pin} = ${pin};\r\n\r\nfloat Reade_Value () {\r\n data=analogRead(analogPin${pin});\r\n voltage=(data/1023)*5;\r\n return voltage;\r\n}`;
            Blockly.Arduino.definitions_['setup_EXT_ROTARY_POTENTIOMETERS_BLOCK_1607506888141'] = `pinMode(analogPin${pin}, INPUT);`;
             return  [`Reade_Value()`];
        }
                    
            return Blockly;
            }

            module.exports = addArduinoCod ;

        